﻿using System;
using Vega.USiteBuilder;

namespace Lu.Blog.Domain.Model.DocumentType
{
    [DocumentType(Name = "Content page", IconUrl = "page.png", AllowedTemplates = new []{"ContentPage"})]
    public class ContentPage : BaseNavigation
    {
        public ContentPage()
        {
        }

        public ContentPage(int nodeId)
            : base(nodeId)
        {
        }

        #region Content

        [DocumentTypeProperty(UmbracoPropertyType.RichtextEditor, Name = "Body", Tab = "Content")]
        public string ContentBody { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.Textstring, Name = "Title", Tab = "Content")]
        public string ContentTitle { get; set; }

        #endregion

        #region PostInformation

        [DocumentTypeProperty(UmbracoPropertyType.DatePicker, Name = "Display date", Tab = "Post information", Description = "If you want to display another date than the post date, edit this field.")]
        public DateTime PostDate { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.Other, OtherTypeName = "AuthorPicker", Name = "Author", Tab = "Post information", Mandatory = true)]
        public string Author { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.TrueFalse, Name = "Disable comment ?", Tab = "Post information", DefaultValue = false)]
        public bool IsCommentDisabled { get; set; }

        [DocumentTypeProperty(UmbracoPropertyType.Tags, Name = "Tags", Tab = "Post information")]
        public string Tags { get; set; }

        #endregion
    }
}